import { MemberPropertyMap as MPM } from "@/map/member/property-map";
import {
  PointMultipleChangePropertyMap as PMCPM,
  PointTypePropertyMap as PTPM,
} from "@/map/point/property-map";
import { MultipleChangeStatus } from "@/map/point/status-map";
import { ceil } from "lodash-es";

export const multipleChangeList = [
  {
    [PMCPM.Id]: "1",
    [PMCPM.Title]: "2023-2024学年第二学期第四周周赛积分发放",
    [PMCPM.PointType]: {
      [PTPM.Id]: 1,
      [PTPM.Name]: "竞赛积分",
    },
    [PMCPM.NumberOfPeople]: 30,
    [PMCPM.Operator]: {
      [MPM.Id]: 1,
      [MPM.Name]: "系统管理员",
    },
    [PMCPM.ChangeTime]: "2024-4-10 20:23:45",
    [PMCPM.Status]: MultipleChangeStatus.EXECUTED,
    [PMCPM.Remark]: "发放2023-2024学年第二学期第四周周赛积分发放，并扣除周赛迟到同学的积分",
  },
  {
    [PMCPM.Id]: "2",
    [PMCPM.Title]: "第十五届蓝桥杯算法竞赛积分发放",
    [PMCPM.PointType]: {
      [PTPM.Id]: 1,
      [PTPM.Name]: "竞赛积分",
    },
    [PMCPM.NumberOfPeople]: 42,
    [PMCPM.Operator]: {
      [MPM.Id]: 1,
      [MPM.Name]: "系统管理员",
    },
    [PMCPM.ChangeTime]: "2024-4-10 20:23:45",
    [PMCPM.Status]: MultipleChangeStatus.EXECUTED,
    [PMCPM.Remark]: "发放2023-2024学年第二学期第四周周赛积分发放，并扣除周赛迟到同学的积分",
  },
  {
    [PMCPM.Id]: "1",
    [PMCPM.Title]: "2023-2024学年第二学期第五周周赛积分发放",
    [PMCPM.PointType]: {
      [PTPM.Id]: 1,
      [PTPM.Name]: "竞赛积分",
    },
    [PMCPM.NumberOfPeople]: 30,
    [PMCPM.Operator]: {
      [MPM.Id]: 1,
      [MPM.Name]: "系统管理员",
    },
    [PMCPM.ChangeTime]: "2024-4-17 20:23:45",
    [PMCPM.Status]: MultipleChangeStatus.WITHDRAWM,
    [PMCPM.Remark]: "发放2023-2024学年第二学期第四周周赛积分发放，并扣除周赛迟到同学的积分",
  },
];

export const multipleChangeItems = {
  [PMCPM.Items]: [
    {
      [PMCPM.ItemId]: 1,
      [PMCPM.ItemTitle]: "周赛一等奖积分",
      [PMCPM.NumberOfPeople]: 5,
      [PMCPM.ItemPoint]: 30,
      [PMCPM.ItemType]: 0,
    },
    {
      [PMCPM.ItemId]: 1,
      [PMCPM.ItemTitle]: "周赛二等奖积分",
      [PMCPM.NumberOfPeople]: 10,
      [PMCPM.ItemPoint]: 20,
      [PMCPM.ItemType]: 0,
    },
    {
      [PMCPM.ItemId]: 1,
      [PMCPM.ItemTitle]: "周赛三等奖积分",
      [PMCPM.NumberOfPeople]: 15,
      [PMCPM.ItemPoint]: 10,
      [PMCPM.ItemType]: 0,
    },
    {
      [PMCPM.ItemId]: 1,
      [PMCPM.ItemTitle]: "周赛迟到扣分",
      [PMCPM.NumberOfPeople]: 3,
      [PMCPM.ItemPoint]: 10,
      [PMCPM.ItemType]: 1,
    },
  ],
  [PMCPM.ItemMembers]: Array.from({ length: 30 }).map((_, index) => {
    const random = Math.ceil(Math.random() * 10);
    const names = ["高霞", "史敏", "毛军", "顾霞", "董霞", "唐秀英", "汪军", "龙超"];
    const genders = ["女", "男"];
    const grade = (random + 1) % 4;
    return {
      [MPM.Id]: index + 1,
      [MPM.No]: `202${grade}070030${random % 10}${index % 10}`,
      [MPM.Name]: names[index % 8],
      [MPM.Gender]: genders[random > 5 ? 0 : 1],
      [MPM.Tel]: `13${random}${ceil(Math.random() * 100000000)}`,
      [MPM.Class]: `202${grade}级`,
      [MPM.RegisterTime]: "2023-4-10 20:23:45",
      [MPM.Points]: random * ceil(Math.random() * 100),
    };
  }),
};
